<?php if(!class_exists('raintpl')){exit;}?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:og="http://ogp.me/ns#"
  xmlns:fb="http://www.facebook.com/2008/fbml">
<head>

<meta charset="utf-8" />
<title>Santorini Water Fantasy</title>

<link href="http://localhost/waterfantasy/html/css/reset.css" rel="stylesheet" type="text/css">
<link href="http://localhost/waterfantasy/html/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id = "home-schedule">
	<div class = "head-bar">

		<a href = "home-schedule.html?date=<?php echo $prev;?>"><img src="http://localhost/waterfantasy/html/images/btn-prev-month.jpg" class = "btn-next-month"></a>
		<a href = "home-schedule.html?date=<?php echo $next;?>"><img src="http://localhost/waterfantasy/html/images/btn-next-month.jpg" class = "btn-next-month"></a>
		<a href = "home-schedule.html?date=<?php echo $today;?>"><img src="http://localhost/waterfantasy/html/images/btn-today.jpg" class = "btn-next-month" style = "margin-left:20px;"></a>

		<h2><?php echo $month;?></h2>
	</div>

	<div class = "month-view">
		<div class = "box head"><?php echo $e['sun'];?></div>
		<div class = "box head"><?php echo $e['mon'];?></div>
		<div class = "box head"><?php echo $e['tue'];?></div>
		<div class = "box head"><?php echo $e['wed'];?></div>
		<div class = "box head"><?php echo $e['thu'];?></div>
		<div class = "box head"><?php echo $e['fri'];?></div>
		<div class = "box head"><?php echo $e['sat'];?></div>

		<?php $counter1=-1; if( isset($all_box) && is_array($all_box) && sizeof($all_box) ) foreach( $all_box as $key1 => $value1 ){ $counter1++; ?>
			<div class = "box <?php echo $value1["class"];?> <?php if( $value1["date"] == $today ){ ?> today <?php } ?>">
				<span class = "date"><?php echo $value1["d"];?></span>
				<?php if( $value1["have"] == 1 ){ ?>
					<?php $counter2=-1; if( isset($all_date[$value1["date"]]) && is_array($all_date[$value1["date"]]) && sizeof($all_date[$value1["date"]]) ) foreach( $all_date[$value1["date"]] as $key2 => $value2 ){ $counter2++; ?>
						<a href = "#" class = "ajax"><span class = "event <?php echo $value2["line"];?>"><?php echo $value2["topic"];?></span></a>
					<?php } ?>
				<?php } ?>
			</div>
		<?php } ?>
		<div class = "clear"></div>
	</div>
</div>

<script>
$(document).ready(function(){

$(".ajax").click(function(){
	window.parent.$.fancybox('<img src="http://farm5.static.flickr.com/4058/4252054277_f0fa91e026.jpg">');
});
	/*
	$(".ajax").fancybox({
		'width'				: '75%',
		'height'			: '75%',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe',
	});
	*/
});
</script>

</body>
</html>